package com.core.reach.cloudhub.service;

import com.core.reach.cloudhub.domain.CommonResult;
import com.core.reach.cloudhub.domain.Payment;
import com.core.reach.cloudhub.service.fallback.PaymentServiceFallbackImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author ga.zhang
 * @version V1.0
 * @description: TODO
 * @date 2020/3/31 16:15
 **/
@FeignClient(value = "nacos-payment-provider", fallback = PaymentServiceFallbackImpl.class)
public interface PaymentService {

    /**
     * openFeign
     * @param id id
     * @return CommonResult
     */
    @GetMapping("/paymentSql/{id}")
    CommonResult<Payment> paymentSql(@PathVariable("id") Long id);

}
